<?php
/**
 * My new Zend Framework project
 * 
 * @author  
 * @version 
 */
$paths = array(
	'.',
	realpath(dirname(__FILE__) . '/../application/_default/controllers'),
	realpath(dirname(__FILE__) . '/../application/_default/models'),
	realpath(dirname(__FILE__) . '/../../library-common'),
	realpath(dirname(__FILE__) . '/../../library'),
	);
set_include_path(implode(PATH_SEPARATOR, $paths));

//Project root dir path: ../application
define('ROOT_PATH',dirname(dirname(__FILE__)));

require_once 'Initializer.php';
 
// Prepare the front controller. 
$fc = Zend_Controller_Front::getInstance(); 

// Change to 'product' parameter under production environemtn
// Change to 'dev' 输出更多附加错误信息
// Change to 'test' 关闭错误截获，直接抛出
if ('www-seraph-common' == $_SERVER['HTTP_HOST'] || 'test-seraph-common' == $_SERVER['HTTP_HOST']) {
	$initCode = 'test';	
}
else {
	$initCode = 'dev';
}
$fc->registerPlugin(new Initializer($initCode));

//记录PHP启动时间
$s = new Zend_Session_Namespace('DebugInfo');
$s->procTimeStart = microtime();

// Dispatch the request using the front controller.
$fc->dispatch();
